Fix sign extension error in TPO that'd show up as a negative malloc if
authorrobertl <robertl>
Wed, 8 Oct 2008 01:24:57 +0000 (01:24 +0000)
committerrobertl <robertl>
Wed, 8 Oct 2008 01:24:57 +0000 (01:24 +0000)
we had > 32,767 track points.

tpo.c

diff --git a/tpo.c b/tpo.c
index 7787e0c214649b5896592d480ab0186404885e85..372ab86dde15378af841c243c4c7956a2498b15c 100644 (file)
--- a/tpo.c
+++ b/tpo.c
@@ -424,7 +424,7 @@ int tpo_read_int()
 
         case 0xfe:  // 16-bit value
 //printf("Found 16-bit value indicator: %x\n", val);
-            return( gbfgetint16(tpo_file_in) );
+            return( gbfgetuint16(tpo_file_in) );
             break;
 
         default:    // 8-bit value